<?php
/**
 * Created by PhpStorm.
 * User: chenzhitao
 * Date: 2018/3/20
 * Time: 上午9:38
 */

namespace app\index\controller;


use app\index\service\CategoryService;
use app\index\service\UrlService;
use think\Controller;

class User extends BaseController
{
    public function login(){
        $url_list = UrlService::getIndexThirdUrlList();
        $this->assign("thirdurl_list",$url_list);
        return $this->fetch("login");
    }
    public function reg(){
        $url_list = UrlService::getIndexThirdUrlList();
        $category_list = CategoryService::getSupCategoryList();
        $this->assign("thirdurl_list",$url_list);
        $this->assign("category_list",$category_list);
        $url_list = UrlService::getIndexThirdUrlList();

        $this->assign("thirdurl_list",$url_list);
        $this->fetch("public/footer");
        return $this->fetch("regin");
    }
    public function forgetPwd(){
        $url_list = UrlService::getIndexThirdUrlList();
        $category_list = CategoryService::getSupCategoryList();
        $this->assign("thirdurl_list",$url_list);
        $this->assign("category_list",$category_list);
        return $this->fetch("forgetPwd");
    }
    public function regAggre(){
        $url_list = UrlService::getIndexThirdUrlList();
        $category_list = CategoryService::getSupCategoryList();
        $this->assign("thirdurl_list",$url_list);
        $this->assign("category_list",$category_list);
        return $this->fetch("reginAggrement");
    }
    public function regSuccess(){
        $url_list = UrlService::getIndexThirdUrlList();
        $category_list = CategoryService::getSupCategoryList();
        $this->assign("thirdurl_list",$url_list);
        $this->assign("category_list",$category_list);
        return $this->fetch("reginSuccess");
    }

    public function aboutUs(){
        $category_list = CategoryService::getSupCategoryList();
        $url_list = UrlService::getIndexThirdUrlList();

        $this->assign("thirdurl_list",$url_list);
        $this->fetch("public/footer");
        $this->assign("category_list",$category_list);
        $this->assign("idIndex","5");
        $this->fetch("public/header");
        return $this->fetch("aboutUs",["idIndex"=>"5"]);
    }

    public function loyer(){
        $category_list = CategoryService::getSupCategoryList();
        $url_list = UrlService::getIndexThirdUrlList();
        $this->assign("category_list",$category_list);
        $this->assign("thirdurl_list",$url_list);
        $this->assign("idIndex","5");
        $this->fetch("public/header");
        return $this->fetch("loyer",["idIndex"=>"5"]);
    }
}